package com.codexsoft.test;

import org.apache.wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel;
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
import org.apache.wicket.extensions.markup.html.tabs.ITab;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.Model;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: lotos
 * Date: 19.08.11
 * Time: 13:14
 * To change this template use File | Settings | File Templates.
 */
public class UInfoPage extends WebPage {

    public UInfoPage() {

        List<ITab> tabList = new ArrayList<ITab>();
        tabList.add(new AbstractTab(new Model<String>("Country")) {
            @Override
            public Panel getPanel(String id) {
                return new CountryTabPanel(id);
            }
        });
        tabList.add(new AbstractTab(new Model<String>("City")) {
            @Override
            public Panel getPanel(String id) {
                return new CityTabPanel(id);
            }
        });
        tabList.add(new AbstractTab(new Model<String>("University")) {
            @Override
            public Panel getPanel(String id) {
                return new UniversityTabPanel(id);
            }
        });
        add(new Label("header", "University Information"));
        AjaxTabbedPanel tabbedPanel = new AjaxTabbedPanel("content", tabList);
        add(tabbedPanel);
        add(new LoginPage("login"));
    }
}
